package cn.xiaozhi0802.dao;

import cn.xiaozhi0802.domain.Account;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 编写service接口和实现类
 * @author Administrator
 */
@Repository
public interface IAccountDao {
    /**
     * 保存
     * @param account
     */
   @Insert("insert into account (name,money) values (#{name},#{money})")
    public void saveAccount(Account account);

    /**
     * 查询全部
     * @return
     */
    @Select("select * from account")
    public List<Account> findAll();
}
